{% extends "html/base_layout.html" %}

{% block title %}homepage{% endblock %}

{% block content %}
<div class="row">
    <div class="col-md-12">
        <p>
            <span class="h1">Projects</span>
            <a href="add-project" class="btn-link" title="Add new project">
                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
            </a>
        </p>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <table class="table table-striped">
            <thead>
                <tr>
                    <th class="col-md-1">No</th>
                    <th class="col-md-10">Name</th>
                    <th class="col-md-1">Action</th>
                </tr>
            </thead>
            <tbody>
{% for project in project_records %}
                <tr>
                    <td class="col-md-1">{{loop.index}}</td>
                    <td class="col-md-10">{{project.name}}</td>
                    <td class="col-md-1">
                        <a href="edit-project?key={{project.key.urlsafe()}}" class="btn-link" title="Edit this item">
                            <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
                        </a>
                        <a href="delete-project?key={{project.key.urlsafe()}}" class="btn-link" title="Delete this item">
                            <span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span>
                        </a>
                    </td>
                </tr>    
{% endfor %}
            </tbody>
        </table>
    </div>
</div>


{% endblock %}
